import request from '@/utils/request'

let baseMapping = "/course_service/video/";

export default {

  //根据id查询小节信息
  getVideoById(id) {
    return request({
      url: baseMapping + `getVideoById/${id}`,
      method: 'get'
    })
  },

  //添加课程小节
  addVideo(video) {
    return request({
      url: baseMapping + `addVideo`,
      method: 'post',
      data: video
    })
  },

  //修改小节
  updateVideo(video) {
    return request({
      url: baseMapping + `updateVideo`,
      method: 'post',
      data: video
    })
  },

  //删除小节
  deleteVideo(id) {
    return request({
      url: baseMapping + `deleteVideo/${id}`,
      method: 'get'
    })
  }
}
